export function setcookie(key,value,seconds,path='/')
{
    var date = new Date()
    date.setTime(date.getTime() - 8*3600*1000+seconds*1000)
    document.cookie = key + '=' + value + ';expires=' + date + ';path=' + path
}
export function getcookie(key)
{
    var cookies = document.cookie
    if(!cookies) return
    var arr = cookies.split('; ')
    for(var a = 0;a < arr.length;a++)
    {
        var brr = arr[a].split('=')
        if(brr[0]=== key)
        {
            return brr[1]
        }
    }
}
export function removecookie(key,path='/')
{
    setcookie(key,null,-1,path)
}